34. Quiz: More With Dictionaries

Context

Use the dictionary below to answer ALL of the questions regarding dictionaries. Consider you have a dictionary named animals that looks like this:

animals = {'dogs': [20, 10, 15, 8, 32, 15], 'cats': [3,4,2,8,2,4], 'rabbits': [2, 3, 3], 'fish': [0.3, 0.5, 0.8, 0.3, 1]}

Let's try a few ideas with this dictionary! If you want to try any of the code yourself, you can test it in the environment at the bottom of the page.

QUIZ QUESTION: :

Question 1

Match each description to the value it describes.

ANSWER CHOICES:



Description

Value

Error

None

8

Error

Error

[20, 10, 15, 8, 32, 15]

string

list

[0.3, 0.5, 0.8, 0.3, 1]

15

SOLUTION:

Description

Value

Error

8

Error

Error

[20, 10, 15, 8, 32, 15]

string

list

[0.3, 0.5, 0.8, 0.3, 1]

Start Quiz:

animals = {'dogs': [20, 10, 15, 8, 32, 15], 
 'cats': [3,4,2,8,2,4], 
 'rabbits': [2, 3, 3], 
 'fish': [0.3, 0.5, 0.8, 0.3, 1]}